﻿<Window x:Class="FishingSearch.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:FishingSearch"
        Title="Fishing Search" Height="700" Width="1000"
        WindowStartupLocation="CenterOwner">


    <Window.Background>
        <LinearGradientBrush EndPoint="0.8,0.98"
                           StartPoint="-0.500,-0.197">
            <GradientStop Color="#FFD6E1EA"
                      Offset="0" />
            <GradientStop Color="#FF00000F"
                      Offset="1" />
            <GradientStop Color="#FF6EB5F5"
                      Offset="0.304" />
        </LinearGradientBrush>
    </Window.Background>
    
    <DockPanel>
        <Border DockPanel.Dock="Top">
            <Menu>
                <MenuItem Header="File" >
                    <MenuItem Header="Converti in Excel" Click="SaveExcel_Click">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/excel.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Esci" Click="Esci_Click" IsEnabled="True">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/exit.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>

                <MenuItem Header="Opzioni" >
                    <MenuItem Header="Canne" Click="OpzioniCanne_Click">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/rod.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Mulinelli" Click="OpzioniMulinelli_Click">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/reel.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Artificiali" Click="OpzioniArtificiali_Click">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/artificial.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="Altro" Click="OpzioniAltro_Click">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/option.png" />
                        </MenuItem.Icon>
                    </MenuItem>


                </MenuItem>

                <MenuItem Header="Info" Click="Info_Click" >
                    <MenuItem Header="Info">
                        <MenuItem.Icon>
                            <Image Width="20" Height="20" Source="/ICONS/info.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>

            </Menu>
        </Border>

        <Border DockPanel.Dock="Left" BorderThickness="0.01" BorderBrush="Black" Width="178">
            <StackPanel>
                <TextBlock />
                <TextBlock Foreground="AliceBlue" FontFamily="Global User Interface" Text="FISHING SEARCH" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <TextBlock />

                <StackPanel Name="StackPanelLeftMenu">
                    <StackPanel.Resources>
                        <local:ExpanderToBooleanConverter x:Key="ExpanderToBooleanConverter" />
                    </StackPanel.Resources>
                    <Expander Name="expCanneSpigola" Header="CANNE" Style="{StaticResource ExpanderMainWindow}" IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=1}">
                        <StackPanel>
                            <RadioButton Content="Da spigola dalla costa" Name="rdbCanneSpigola" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Da serra dalla costa" Name="rdbCanneSerra"  Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Da barca" Name="rdbCanneBarca" Style="{StaticResource RadioButtonMainWindow}"/>
                        </StackPanel>
                    </Expander>
                    <Expander Name="expMulinelli" Header="MULINELLI" Style="{StaticResource ExpanderMainWindow}"
                              IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=2}">
                        <StackPanel>
                            <RadioButton Content="Da spigola dalla costa" Name="rdbMulinelliSpigola" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Da serra dalla costa" Name="rdbMulinelliSerra" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Da barca" Name="rdbMulinelliBarca" Style="{StaticResource RadioButtonMainWindow}"/>
                        </StackPanel>
                    </Expander>
                    <Expander Name="expArtificiale"  Header="ARTIFICIALI" Style="{StaticResource ExpanderMainWindow}"
                              IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=3}">
                        <StackPanel>
                            <RadioButton Content="Long jerk" Name="rdbArtificialiLongJerk" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Poppers" Name="rdbArtificialiPoppers" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Jigs/Siliconici" Name="rdbArtificialiJigsSiliconici" Style="{StaticResource RadioButtonMainWindow}"/>
                        </StackPanel>
                    </Expander>
                    <Expander Name="expAltro" Header="ALTRO" Style="{StaticResource ExpanderMainWindow}"
                      IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=4}">
                        <StackPanel>
                            <RadioButton Content="Trecciati" Name="rdbAltroTrecciati" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Nylon" Name="rdbAltroNylon" Style="{StaticResource RadioButtonMainWindow}"/>
                            <RadioButton Content="Fluorocarbon" Name="rdbAltroFluorocarbon" Style="{StaticResource RadioButtonMainWindow}"/>
                        </StackPanel>
                    </Expander>
                </StackPanel>
                <TextBlock />
                <TextBlock />
                <TextBlock />
                <Button Style="{StaticResource ButtonSearch}" Name="btnSearch" Click="btnSearch_Click" >
                    <Button.ToolTip>
                        <ToolTip>
                            <StackPanel>
                                <TextBlock FontWeight="Bold">CERCA</TextBlock>
                                <!--<TextBlock>Clicca per iniziare la ricerca.</TextBlock>-->
                            </StackPanel>
                        </ToolTip>
                    </Button.ToolTip>

                </Button>
                <TextBlock />
                <TextBlock />
                <TextBlock>
                    <TextBlock Name="txtTrovate" Foreground="AliceBlue" FontFamily="Global User Interface" FontSize="13" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                </TextBlock>
            </StackPanel>

        </Border>
        <Border DockPanel.Dock="Bottom" ></Border>

        <Border >

            <Grid Name="gridResults">
                <Image Name="imgFishCentral" Visibility="Visible" Width="256" Height="256" Source="/ICONS/fish.png" />
                <DataGrid Name="dataGridResults" Visibility="Hidden"
                SelectionUnit="Cell"
                    SelectionMode="Single" 
                    HorizontalScrollBarVisibility="Auto" 
                    VerticalScrollBarVisibility="Auto" 
                    IsReadOnly="True" 
                    BorderBrush="Gray" 
                    BorderThickness="5" 
                    RowBackground="#FFD6E1EA"
                    AlternatingRowBackground="White" 
                    ItemsSource="{Binding}" 
                    Margin="0,0,0,0">
                    <DataGrid.Resources>
                        <Style TargetType="Hyperlink">
                            <EventSetter Event="Click" Handler="DG_Hyperlink_Click"/>
                        </Style>
                    </DataGrid.Resources>

                </DataGrid>

            </Grid>

        </Border>
    </DockPanel>

</Window>
